Introduction

For the final I decided to make a Hands free Toilet seat cover. When Niel gave his first lecture he mentioned sketching a possible final project and mentioned project management techniques and I thought of following the spiral experiment. So I tried to link weekly assignments to the final project and this page is about such project development.I started drafting/ sketching my final project in week 1 page.

My Problem statement

Usually when using Public toilets we often doubt about the hygiene of seat cover and germs can be easily transmitted through hands. People need such kind of automation in seat covers that detects the presence of humans inside a toilet. When pandemic hit the world the final project which i have been doing got more relevance.

Machines and Tools Used

  • Laser Cutting(Trotec)
  • 3D Printer ( Ultimaker 2+,Prusa)
  • PCB Milling Machine (Roland)
  • Form Cutter ( Fabricated in fablab)
  • Soldering tools.
  • Drilling Machine.
  • Vacuum Pump (For composite)
  • Softwares Used

  • Eagle
  • Autodesk Fusion 360
  • Jedicut
  • Arduino IDE
  • Slicer software - Cura and PrusaSlicer
  • MODS
  • GIMP
  • Openshot Video Editor
  • Pinta
  • Bill of Materials

    ‣ My Slide

    ‣ My Final Project Video


    ‣ FINAL PROJECT DESIGN FILES click here


    Credits and Thanks

    I would like to express my gratitude to Mr. Jogin and Mr. Joel who helped me to realize this project. Also would like to mention and thank our instructor Mr. Yadhu Sharon who guided us to present the Final project in a good way. My Fabacademy group- Ms. Nanditha, Mr. Eldho, Mr. Anooj and Mr. Nibin have always stood with me from the day I conceptualized the final project idea to the day I presented the project. Finally i would like to thank fabacademy team and Prof. Neil Gershenfeld for introducing me to digital fabrication.

    ‣ 3D Designing Main body

    I started with designing the main body which acts as a housing for DC motors, gear system for force transmission and Circuit board.

    First thought was, how to transfer the rotational motion of the DC motor for opening and closing of seat covers. For this I need a fairly good torque. When i searched for high torque 12v-24v DC motor i found that its very costly and pandemic situation forced me to fix DC gear motor 12v with rated torque of 3-6 kg-cm with 600 rpm Next step was to find a gear mechanism to create a good torque and slow rotation. I found a worm gear mechanism to suit my purpose.

    I discussed the concept with one of my instructors and he gave some suggestions in designing the main body. He gave me a worm gear profile that he created previously for another project and that gave me to kick start my 3D designing.

    I imported worm screw and worm wheel

    I actually combined a mechanical part to the worm wheel. From this i can joint the seat covers

    For operating two covers(top and bottom) I needed each set of worm gear mechanism so I used a mirror tool to create the same. I developed a hinge mechanism, aligning the two gear mechanisms. Provision is given for a shaft member to run all across the parts and to connect to the main body.

    Partially removed worm wheel bottom part to save space. I intent to design a compact main body

    Then I developed a housing part to support the worm screw and DC motor. I imported a DC motor 3D image from FreeCAD, this helped me to design supporting parts, holes were provided to screw the motors.

    Completed designing of power transmission mechanism

    Provided a covering

    Next i need to provide cabin like spaces for locating feed back mechanism and circuit boards

    Designing Feedback mechanism

    Controlling the positions of seat covers is a challenge here. I intend to design a feedback mechanism to monitor real time position of covers. For that I added an extruded part from the worm wheel and coupled it with a potentiometer. The reading of potentiometer helps us to monitor the position

    Designing a setup to hold potentiometers and connecting potentiometer knob to worm wheel.

    After attaching potentiometer

    Both side potentiometers are added and etra cabin is taken on both sides

    FInal Design

    Main parts can be prototyped using laser cutting vinyl sheets and 3D printing the worm gears and cover.

    ‘Joint ‘ operation and parts aligned on a stock material

    Laser Cutting

    After laser cutting operation, I used a 6 mm acrylic sheet.

    3D printing

    I 3D printed the worm gear and covers to the main body in ultimaker 2+ , PLA material

    All parts before assemebly

    Composite Making

    I made the seat cover both bottom part and top part by composite making methodology. I documented the making in week 16_ wild card

    I later used aerosol acrylic spray paint to give a white color finish

    Circuit Desiging

    For circuit designing I used Eagle. ATMEGA328P microcontroller is used. The list i mentioned in bill of materials

    The Schematic image

    The Board image

    Then exported the board image(traces) in monochromatic format.

    Modella PCB milling machine is used to mill circuit board

    After Soldering

    Programming

    I used arduino IDE for programming.

           #include < SoftwareSerial.h>
                    SoftwareSerial mySerial(1, 0); // RX, TX
                    
                    #define cover_motor_pin1 A5 // -Up
                    #define cover_motor_pin2 A4 // -Down
                    #define seat_motor_pin1 A3  // -Up
                    #define seat_motor_pin2 A2  // -Down
                    
                    #define cover_pot A1
                    #define cover_pot_mini 328
                    #define cover_pot_max 644
                    
                    #define seat_pot A6
                    #define seat_pot_mini 287
                    #define seat_pot_max  600
                    
                    #define trig_pin_us_sense 2
                    #define echo_pin_us_sense 3
                    long duration_us_sense;
                    int distance_us_sense;
                    
                    #define trig_pin_us_keep 5
                    #define echo_pin_us_keep 6
                    long duration_us_keep;
                    int distance_us_keep;
                    
                    #define FULL_OPEN 0
                    #define HALF_OPEN 1
                    #define FULL_CLOSE 2
                    
                    int state_flag = 2;
                    
                    
                    void setup() {
                      pinMode(cover_pot, INPUT);
                      pinMode(seat_pot, INPUT);
                      mySerial.begin(9600);
                    
                      pinMode(cover_motor_pin1, OUTPUT);
                      pinMode(cover_motor_pin2, OUTPUT);
                      pinMode(seat_motor_pin1, OUTPUT);
                      pinMode(seat_motor_pin2, OUTPUT);
                    
                      pinMode(trig_pin_us_sense, OUTPUT);
                      pinMode(echo_pin_us_sense, INPUT);
                    
                      pinMode(trig_pin_us_keep, OUTPUT);
                      pinMode(echo_pin_us_keep, INPUT);
                    
                      // full_close();
                    }
                    
                    void loop() {
                      switch (state_flag) {
                        case FULL_CLOSE:
                          waite();
                          break;
                        case HALF_OPEN:
                          wake();
                          break;
                        case FULL_OPEN:
                          break;
                      }
                      //full_open();
                      //full_close();
                      //half_open();
                    }
                    
                    
                    void waite() {
                      int sense = read_sense();
                      if (sense < 50) {
                        half_open();
                      }
                      else {
                        delay(4000);
                      }
                    
                    }
                    void wake() {
                      int sense = read_sense();
                      int keep = read_keep();
                    
                      if (sense < 50) {
                        full_open();
                      }
                    
                    }
                    //--------------------------- Ultrasonic -------------------------------------
                    //----------------------------------------------------------------------------
                    
                    int read_sense() {
                    
                      // Clears the trigPin
                      digitalWrite(trig_pin_us_sense, LOW);
                      delayMicroseconds(200);
                      // Sets the trigPin on HIGH state for 10 micro seconds
                      digitalWrite(trig_pin_us_sense, HIGH);
                      delayMicroseconds(200);
                      digitalWrite(trig_pin_us_sense, LOW);
                    
                      // Reads the echoPin, returns the sound wave travel time in microseconds
                      duration_us_sense = pulseIn(echo_pin_us_sense, HIGH);
                      // Calculating the distance
                      distance_us_sense = duration_us_sense * 0.034 / 2;
                      return distance_us_sense;
                    }
                    int read_keep() {
                    
                      // Clears the trigPin
                      digitalWrite(trig_pin_us_keep, LOW);
                      delayMicroseconds(200);
                      // Sets the trigPin on HIGH state for 10 micro seconds
                      digitalWrite(trig_pin_us_keep, HIGH);
                      delayMicroseconds(200);
                      digitalWrite(trig_pin_us_keep, LOW);
                    
                      // Reads the echoPin, returns the sound wave travel time in microseconds
                      duration_us_keep = pulseIn(echo_pin_us_keep, HIGH);
                      // Calculating the distance
                      distance_us_keep = duration_us_keep * 0.034 / 2;
                      return distance_us_keep;
                    }
                    
                    //----------------------------------------------------------------------------
                    //----------------------------------------------------------------------------
                    
                    void half_open() {
                      seat_down();
                      delay(1000);
                      cover_up();
                      delay(1000);
                    
                      state_flag = HALF_OPEN;
                    }
                    void full_open() {
                      cover_up();
                      delay(1000);
                      seat_up();
                      delay(1000);
                    
                      state_flag = FULL_OPEN;
                    }
                    
                    //----------------------------------------------------------------------------
                    
                    void full_close() {
                      seat_down();
                      delay(1000);
                      cover_down();
                      delay(1000);
                    
                      state_flag = FULL_CLOSE;
                    }
                    
                    //----------------------------------------------------------------------------
                    
                    void cover_up() {
                      digitalWrite(cover_motor_pin1, HIGH);
                      digitalWrite(cover_motor_pin2, LOW);
                      while (analogRead(cover_pot) < cover_pot_max) {
                        mySerial.println(analogRead(cover_pot));
                        delay(50);
                      }
                      digitalWrite(cover_motor_pin1, HIGH);
                      digitalWrite(cover_motor_pin2, HIGH);
                    }
                    void cover_down() {
                      digitalWrite(cover_motor_pin1, LOW);
                      digitalWrite(cover_motor_pin2, HIGH);
                      while (analogRead(cover_pot) > cover_pot_mini) {
                        mySerial.println(analogRead(cover_pot));
                        delay(50);
                      }
                      digitalWrite(cover_motor_pin1, HIGH);
                      digitalWrite(cover_motor_pin2, HIGH);
                    }
                    
                    //----------------------------------------------------------------------------
                    
                    void seat_up() {
                      digitalWrite(seat_motor_pin1, HIGH);
                      digitalWrite(seat_motor_pin2, LOW);
                      while (analogRead(seat_pot) < seat_pot_max) {
                        mySerial.println(analogRead(seat_pot));
                        delay(50);
                      }
                      digitalWrite(seat_motor_pin1, HIGH);
                      digitalWrite(seat_motor_pin2, HIGH);
                    }
                    void seat_down() {
                      digitalWrite(seat_motor_pin1, LOW);
                      digitalWrite(seat_motor_pin2, HIGH);
                      while (analogRead(seat_pot) > seat_pot_mini) {
                        mySerial.println(analogRead(seat_pot));
                        delay(50);
                      }
                      digitalWrite(seat_motor_pin1, HIGH);
                      digitalWrite(seat_motor_pin2, HIGH);
                    }

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.